<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="author" content="PIXINVENT">
    <title></title>
    <link rel="stylesheet" type="text/css" th:href="@{/app-assets/css/vendors.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/app-assets/css/vertical-menu.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/app-assets/css/bootstrap-extended.css}">
</head>
<body>
<div class="content-wrapper">
    <div class="content-header ">
        <div class="content-header-left mb-2 clearfix">
            <h3 class="content-header-title mb-0 pull-left" th:if="${null == employee.employeeId}">添加员工信息</h3>
            <h3 class="content-header-title mb-0 pull-left" th:if="${null != employee.employeeId}">修改员工信息</h3>

        </div>
    </div>

    <div class="card">
        <form id="employeeForm" name="employeeForm" th:method="POST" th:action="@{/employee_infor}" th:object="${employee}">
            <!--2、在 form 表单中增加一个 input 输入框（hidden）用来告诉springboot我们要发送什么请求（PUT、DELETE）-->
            <input type="hidden" name="_method" value="PUT" th:if="${null != employee.employeeId}" />
            <input type="hidden" name="employeeId" th:value="*{employeeId}" />
            <div class="card-content">
                <div class="card-body">

                    <div class="form1 form3" >

                        <ul class="row">
                            <li class="col-sm-10 col-xs-12">
                                <span>员工姓名：</span><input type="text" class="form-control" name="employeeName" th:value="*{employeeName}">
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="password">员工密码：</span><input type="text" class="form-control" name="password" id="password" th:value="*{password}">
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="employeeRole">员工角色：</span><select name="employeeRole" id="employeeRole" class="form-control">
                                <option value="0">总经理</option>
                                <option value="1">部门经理</option>
                                <option value="2">普通员工</option>
                            </select>
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="gender">员工性别：</span><select name="gender" id="gender" class="form-control">
                                <option value="1">男</option>
                                <option value="2">女</option>
                            </select>
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="birth">员工生日：</span><input type="date" class="form-control" id="birth" name="birth" th:value="*{#dates.format(birth, 'yyyy-MM-dd')}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="email">员工邮箱：</span><input type="text" class="form-control" name="email" id="email" th:value="*{email}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="address">员工地址：</span><input name="address" class="form-control" id="address" th:value="*{address}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="phone">员工手机：</span><input type="text" class="form-control" name="phone" id="phone" th:value="*{phone}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="departmentId">员工所属部门id：</span><input type="text" class="form-control" name="departmentId" id="departmentId" th:value="*{departmentId}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="postId">员工所属岗位id：</span><input type="text" class="form-control" name="postId" id="postId" th:value="*{postId}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="totalSalary">员工最终薪资：</span><input type="text" class="form-control" name="totalSalary" id="totalSalary" th:value="*{totalSalary}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="jobStatus">员工在职状态：</span><select name="jobStatus" id="jobStatus" class="form-control">
                                <option value="0">在职</option>
                                <option value="1">离职</option>
                            </select>
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="entryDate">入职时间：</span><input type="date" name="entryDate" id="entryDate" class="form-control"
                                                                         th:value="*{#dates.format(entryDate, 'yyyy-MM-dd')}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <span for="resignationDate">离职时间：</span><input type="date" name="resignationDate" id="resignationDate" class="form-control"
                                                                               th:value="*{#dates.format(resignationDate, 'yyyy-MM-dd')}" />
                            </li>
                            <li class="col-sm-10 col-xs-12">
                                <input type="submit" id="add" class="btn btn-primary" name="add" th:value="保存"/>
                                <input type="button" class="btn btn-primary" th:href="@{/employee_infro/employee_infor}" id="back" name="back" th:value="返回"/>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>


<script th:src="@{/app-assets/js/vendors.min.js}" type="text/javascript"></script>
<script th:src="@{/app-assets/js/app-menu.js}" type="text/javascript"></script>
<script th:src="@{/app-assets/js/app.js}" type="text/javascript"></script>
<script th:src="@{/app-assets/js/echarts.min.js}" type="text/javascript"></script>
<script th:src="@{/app-assets/js/jquery.bigcolorpicker.min.js}" type="text/javascript"></script>
<script th:src="@{/app-assets/laydate/laydate.js}" type="text/javascript"></script>
<script>
    lay('#version').html('-v'+ laydate.v);
    laydate.render({
        elem: '#test1'
        ,range: true
        ,theme: '#00B5B8'
    });
</script>
</body>
</html>